Skip to content

Migrate money request distance, manual distance and rate steps to dyn… - #97780

Merged
mjasikowski merged 5 commits into
Expensify:mainfrom
suneox:83851-migrate-money-request-part-2-suneox
Aug 15, 2026
Merged

mjasikowski merged 5 commits into
Expensify:mainfrom
suneox:83851-migrate-money-request-part-2-suneox

Conversation

@suneox

@suneox suneox commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

Fixed Issues

$ #83851
PROPOSAL:

Tests

DYNAMIC_ROUTES.MONEY_REQUEST_STEP_DISTANCE — edit waypoints (expense-distance)

Case 1.1 — Confirmation page → Distance field

Target: src/components/MoneyRequestConfirmationList/sections/DistanceField.tsx#L74

Precondition: you are on the Confirmation step of a waypoint-based distance expense (not manual / odometer / GPS).

Steps:

  1. Open the app and sign in → FAB (+) → Create expense → Distance tab → enter start/finish → Next → Confirmation.
  2. Note the current URL (the base).
  3. Tap the Distance field.
  4. Expected: URL is <base>/expense-distance?action=create&iouType=submit&transactionID=<txn>&reportID=<report> and the waypoint page opens.
  5. Tap Back → Expected: you return to the base with the suffix and its query stripped.

Case 1.2 — Expense details → Distance field

Target: src/components/ReportActionItem/MoneyRequestView.tsx#L985

Precondition: a submitted, unsettled distance expense.

Steps:

  1. Open a distance expense (transaction thread /r/<id>).
  2. Tap the Distance row.
  3. Expected: URL is /r/<id>/expense-distance?action=edit&iouType=submit&transactionID=<txn>&reportID=<id>.
  4. Edit a waypoint and Save.
  5. Expected: you return to /r/<id> with the updated distance.

Case 1.3 — Waypoint edit reuses the dynamic URL as its backTo (GH #90037)

Target: src/pages/iou/request/step/DynamicIOURequestStepDistance.tsx#L382 — now createDynamicRoute(suffix.getRoute(...), backPath)

Steps:

  1. Follow case 1.2 up to step 3.
  2. Tap a waypoint (e.g. the start) to open the waypoint editor.
  3. Expected: the waypoint screen opens on its static route with ?backTo=<encoded dynamic URL> — the encoded value must contain expense-distance and the action/iouType/transactionID/reportID query.
  4. Tap Back (or save the waypoint).
  5. ⚠️ Expected: you return to the dynamic distance page — not Home, not /not-found, and the RHP is not torn down (this is the bug [Due for payment 2026-05-20] [Due for payment 2026-05-18] Split distance - App crashes when clicking RHP back button on waypoints editor #90037 the explicit base guards against).

Case 1.4 — The create wizard is unaffected (dual-screen MONEY_REQUEST.CREATE)

Target: src/pages/iou/request/IOURequestStartPage.tsx#L322

Steps:

  1. FAB (+) → Create expense → Distance tab.
  2. Expected: the URL is still the static tab route /create/submit/start/<txn>/<report>/distance — no expense-distance suffix.
  3. Enter two waypoints and tap Next.
  4. ⚠️ Expected: you move forward to Confirmation (no back navigation), confirming backTo is undefined on the static screen.
  5. Tap Back on the wizard's distance step → Expected: the wizard exits as before.

Case 1.5 — Split expense edit → Distance field

Target: src/pages/iou/SplitExpenseEditPage.tsx#L252

Steps:

  1. Open a distance expense → ⋯ → Split expense → tap one split item.
  2. Tap the Distance field.
  3. Expected: URL is <split-edit base>/expense-distance?action=edit&iouType=split-expense&transactionID=<OPTIMISTIC_DISTANCE_SPLIT_TRANSACTION_ID>&reportID=<reportID>.
  4. Edit a waypoint and Save → Expected: you return to the Split expense edit screen (the RHP is not closed).

Case 1.6 — Refresh / deep link

Steps:

  1. From /r/<id>/expense-distance?..., press F5.
  2. Expected: the distance page reopens in the RHP with /r/<id> restored underneath.
  3. Tap Back → you land on /r/<id>.
  4. Open the same URL in a new tab and verify the same.

Case 1.7 — Legacy URL redirect

Target: OldRoutes — '/*/*/distance/*/*'

Steps:

  1. Paste https://dev.new.expensify.com:8082/edit/submit/distance/<transactionID>/<reportID> and hit Enter.
  2. Expected: it redirects to /r/<reportID>/expense-distance?action=edit&iouType=submit&transactionID=<transactionID>&reportID=<reportID>.
  3. ⚠️ A legacy URL carrying ?backTo= loses its query — same known trade-off as the taxRate redirect on main. Not a failure.


DYNAMIC_ROUTES.MONEY_REQUEST_STEP_DISTANCE_MANUAL — manual distance entry (expense-distance-manual)

Case 2.1 — Confirmation page → Distance field (manual distance)

Target: src/components/MoneyRequestConfirmationList/sections/DistanceField.tsx#L65

Precondition: the expense is a manual distance expense (a typed distance, no waypoints).

Steps:

  1. Create a manual-distance expense and reach Confirmation.
  2. Tap the Distance field.
  3. Expected: URL is <base>/expense-distance-manual?action=create&iouType=submit&transactionID=<txn>&reportID=<report>.
  4. Change the value and Save → Expected: you return to Confirmation with the new distance.

Case 2.2 — Expense details → Distance field (manual)

Target: src/components/ReportActionItem/MoneyRequestView.tsx#L973

Steps:

  1. Open a submitted manual-distance expense (/r/<id>).
  2. Tap the Distance row.
  3. Expected: URL is /r/<id>/expense-distance-manual?action=edit&iouType=submit&transactionID=<txn>&reportID=<id>.
  4. Change the value and Save → Expected: you return to /r/<id> with the updated value.
  5. Reopen and tap Back without editing → Expected: you return to /r/<id>.

Case 2.3 — Split expense edit → Distance field (manual)

Target: src/pages/iou/SplitExpenseEditPage.tsx#L239

Steps:

  1. Split a manual-distance expense → open one split item.
  2. Tap the Distance field.
  3. Expected: URL is <split-edit base>/expense-distance-manual?action=edit&iouType=split-expense&transactionID=<OPTIMISTIC_TRANSACTION_ID>&reportID=<reportID>.
  4. Save → you return to the Split expense edit screen.

Case 2.4 — The distance-create wizard is unaffected (dual-screen DISTANCE_CREATE)

Target: src/pages/iou/request/DistanceRequestStartPage.tsx#L152

Steps:

  1. Start the distance expense creation flow and switch to the Manual tab.
  2. Expected: the URL is still the static tab route (.../distance-manual) with no expense-distance-manual suffix.
  3. Enter a distance and tap Next → Expected: you move forward to Confirmation.

Case 2.5 — Refresh / deep link and legacy URL redirect

Steps:

  1. From /r/<id>/expense-distance-manual?..., press F5 → Expected: the stack is restored correctly.
  2. Paste https://dev.new.expensify.com:8082/edit/submit/distance-manual/<txn>/<report> → Expected: it redirects to /r/<report>/expense-distance-manual?action=edit&iouType=submit&transactionID=<txn>&reportID=<report>.
  3. ⚠️ Verify the legacy distance-manual path is not swallowed by the '/*/*/distance/*/*' pattern — the segment must match distance-manual exactly.


DYNAMIC_ROUTES.MONEY_REQUEST_STEP_DISTANCE_RATE — pick a distance rate (expense-distance-rate)

Case 3.1 — Confirmation page → Rate field

Target: src/components/MoneyRequestConfirmationList/sections/RateField.tsx#L140

Precondition: the workspace has ≥2 enabled distance rates.

Steps:

  1. Create a distance expense on that workspace and reach Confirmation.
  2. Tap the Rate field.
  3. Expected: URL is <base>/expense-distance-rate?action=create&iouType=submit&transactionID=<txn>&reportID=<report> and the rate list opens.
  4. Pick another rate → Expected: you return to Confirmation with the rate and amount updated.

Case 3.2 — Expense details → Rate field

Target: src/components/ReportActionItem/MoneyRequestView.tsx#L1043

Steps:

  1. Open a submitted distance expense (/r/<id>) on a workspace with ≥2 rates.
  2. Tap the Rate row.
  3. Expected: URL is /r/<id>/expense-distance-rate?action=edit&iouType=submit&transactionID=<txn>&reportID=<id>.
  4. Pick another rate → Expected: you return to /r/<id> with the rate updated.

Case 3.3 — Track expense in self-DM → Set default workspace before the rate step

Target: src/components/ReportActionItem/MoneyRequestView.tsx#L1029 — the dynamic route is nested inside SET_DEFAULT_WORKSPACE

Precondition: a distance track expense in self-DM where the user has paid workspaces but no default one (shouldSelectPolicy === true, no policy).

Steps:

  1. Open such an expense → tap the Rate row.
  2. Expected: the Choose workspace screen opens; its URL carries the encoded inner route containing expense-distance-rate plus the action/iouType/transactionID/reportID query.
  3. Pick a workspace.
  4. ⚠️ Expected: you land on the rate picker at the dynamic URL (.../expense-distance-rate?...), not /not-found.
  5. Pick a rate → Expected: you return to the expense with the rate applied.

Case 3.4 — Split expense edit → Rate field

Target: src/pages/iou/SplitExpenseEditPage.tsx#L272

Steps:

  1. Split a distance expense → open one split item → tap the Rate field.
  2. Expected: URL is <split-edit base>/expense-distance-rate?action=edit&iouType=split-expense&transactionID=<OPTIMISTIC_TRANSACTION_ID>&reportID=<reportID>.
  3. Pick a rate → you return to the Split expense edit screen with the new rate.

Case 3.5 — Creating a rate through Upgrade returns to the rate step

Target: src/pages/workspace/distanceRates/CreateDistanceRatePage.tsx#L90 — now createDynamicRoute(..., ROUTES.REPORT_WITH_ID.getRoute(reportID))

Precondition: a distance expense on a workspace without Distance rates enabled, so tapping Rate goes through the Upgrade screen (action === edit).

Steps:

  1. Open such an expense → tap Rate → Expected: the Upgrade screen opens; complete the upgrade.
  2. Expected: the Create distance rate screen opens; enter a name and rate, then Save.
  3. ⚠️ Expected: you return to the rate picker at /r/<reportID>/expense-distance-rate?action=edit&iouType=submit&transactionID=<txn>&reportID=<reportID> with the new rate selected — not /not-found, not the workspace settings.
  4. Repeat the same flow with action === create (from Confirmation) → Expected: you return to Confirmation, unchanged from main.

Case 3.6 — Refresh / deep link and legacy URL redirect

Steps:

  1. From /r/<id>/expense-distance-rate?..., press F5 → Expected: the stack is restored and Back lands on /r/<id>.
  2. Paste https://dev.new.expensify.com:8082/edit/submit/distanceRate/<txn>/<report> → Expected: it redirects to /r/<report>/expense-distance-rate?action=edit&iouType=submit&transactionID=<txn>&reportID=<report>.

Case 3.7 — entryScreens blocks an invalid base

Steps:

  1. Paste https://dev.new.expensify.com:8082/settings/profile/expense-distance-rate?action=edit&iouType=submit&transactionID=1&reportID=2 and hit Enter.
  2. Expected: the rate page does not open; the app falls back to static parsing and logs a warning.

  • Verify that no errors appear in the JS console

Offline tests

  • Same as tests — navigation refactor, offline behavior unchanged.

QA Steps

Test case 1: Edit the manual distance of a new expense (Confirmation)

  1. Sign in, tap the green + → Track distance → switch to the Manual tab, enter a distance and tap Next to reach Confirmation.
  2. Tap the Distance field.
  3. Verify a distance entry panel opens and the address bar shows a URL ending in /expense-distance-manual?action=create&iouType=submit&transactionID=…&reportID=….
  4. Change the distance, tap Save, then verify you return to Confirmation and the distance/amount update.

Test case 2: Pick a distance rate on a new expense (Confirmation)

  1. On a workspace with Distance rates enabled, create a distance expense and reach Confirmation.
  2. Tap the Rate field.
  3. Verify the address bar shows a URL ending in /expense-distance-rate?action=create&iouType=submit&transactionID=…&reportID=… and the rate list opens.
  4. Pick a different rate, then verify you return to Confirmation and the rate/amount update.

Test case 3: Distance-create wizard keeps the static URL (Manual tab)

  1. Tap the green + → Track Distance, then switch to the Manual tab.
  2. Verify the address bar shows the static tab route (.../distance-manual) with no expense-distance-manual suffix.
  3. Enter a distance and tap Next, then verify you move forward to Confirmation (no back navigation).
  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

MacOS: Chrome / Safari
CleanShot.2026-08-10.at.12.08.49.1.mp4
Case 1.1 — Confirmation → Distance

On video

Case 1.2 — Expense view → Distance

On video

Case 1.3 — Waypoint edit → Back (#90037) 1 3-1-before-waypoint-editor-before-tap 1 3-2-entry-waypoint-backto-has-dynamic
Case 1.4 — Create wizard (CREATE) no suffix

On video

Case 1.5 — Split → Distance 1 5-1-before-split-edit-distance-post-fix 1 5-2-entry-split-waypoint-distance-fixed
Case 1.6 — Refresh/deep-link (expense-distance) 1 6-1-before-distance-before-refresh 1 6-2-after-refresh-distance-restored
Case 1.7 — Legacy URL redirect (distance)

On video

Case 2.1 — Confirmation → Distance (manual) 2 1-1-before-confirmation-manual-distance 2 1-2-entry-manual-distance-dynamic 2 1-3-after-save-manual-distance-saved-confirmation
Case 2.2 — Expense view → Distance (manual) 2 2-1-before-expense-thread-manual-distance 2 2-2-entry-manual-distance-edit-dynamic 2 2-3-after-back-thread-restored
Case 2.3 — Split → Distance (manual) 2 3-1-before-manual-split-edit-distance 2 3-1-before-manual-split-item2-distance 2 3-1-before-split-edit-manual-distance
Case 2.4 — Distance-create wizard Manual tab (no suffix) 2 4-1-before-distance-wizard-manual-tab-static 2 4-2-entry-static-tab-no-suffix
Case 2.5 — Refresh + redirect (distance-manual) 2 5-1-before-oldurl-distance-manual-pre 2 5-2-entry-redirected-not-swallowed 2 5-3-before-manual-before-refresh 2 5-4-after-refresh-manual-restored
Case 3.1 — Confirmation → Rate 3 1-1-before-confirmation-rate-field 3 1-2-entry-rate-dynamic 3 2-1-before-expense-thread-rate-field
Case 3.2 — Expense view → Rate 3 2-1-before-expense-thread-rate-field 3 2-2-entry-rate-edit-dynamic
Case 3.3 — Track → Set default workspace → Rate

On video

Case 3.4 — Split → Rate 3 4-1-before-split-edit-rate-field 3 4-2-entry-split-rate-dynamic
Case 3.5 — Upgrade → Create rate → dynamic CleanShot 2026-08-18 at 20 00 00@2x CleanShot 2026-08-18 at 20 00 09@2x CleanShot 2026-08-18 at 20 00 22@2x CleanShot 2026-08-18 at 20 00 53@2x
Case 3.6 — Refresh + redirect (distance-rate)

On video

Case 3.7 — entryScreens blocks invalid base

On video

Case 4.1 — Odometer/GPS/tabs unchanged 4 1-1-before-wizard-tabs-map-manual-gps-odo 4 1-2-entry-tabs-static-no-suffix
Case 4.2 — Offline 4 2-1-before-offline-thread-before-tap 4 2-2-entry-offline-distance-opens 4 2-3-after-back-offline-back-works
Android Native
Android mWeb
iOS Native
CleanShot.2026-08-10.at.18.14.49.1.mp4
iOS mWeb

@codecov

codecov Bot commented Aug 5, 2026 •

Copy link
Copy Markdown

…amic routes

Replaces the static MONEY_REQUEST_STEP_DISTANCE, MONEY_REQUEST_STEP_DISTANCE_MANUAL
and MONEY_REQUEST_STEP_DISTANCE_RATE routes with the `expense-distance`,
`expense-distance-manual` and `expense-distance-rate` dynamic suffixes, following
the MONEY_REQUEST_STEP_TAX_RATE pattern: the legacy path params become query
params of the suffix and back navigation is derived with useDynamicBackPath.

The distance and manual distance pages are still mounted on the static create
screens, so `backTo` stays undefined there and the create wizard keeps its
forward navigation.

Adds OldRoutes redirects for the three legacy paths and covers them with unit
tests in getMatchingNewRouteTest.
@suneox
suneox force-pushed the 83851-migrate-money-request-part-2-suneox branch from 61a3610 to e1b984b Compare August 10, 2026 04:41
The `createDynamicRoute` / `DYNAMIC_ROUTES` imports were dropped while
amending the config.ts tab-host fix, breaking the TypeScript build.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@suneox
suneox marked this pull request as ready for review August 10, 2026 05:17
@suneox
suneox requested review from a team as code owners August 10, 2026 05:17
@melvin-bot
melvin-bot Bot requested review from huult and removed request for a team August 10, 2026 05:17
@melvin-bot

melvin-bot Bot commented Aug 10, 2026

Copy link
Copy Markdown

@huult Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot
melvin-bot Bot requested review from garrettmknight and removed request for a team August 10, 2026 05:17

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0918ca7a0c

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@huult

huult commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
  • I verified tests pass on all platforms & I tested again on:
    • Android: HybridApp
    • Android: mWeb Chrome
    • iOS: HybridApp
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: HybridApp
Android: mWeb Chrome
iOS: HybridApp
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-08-10.at.14.11.29.mp4

@huult huult left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@melvin-bot
melvin-bot Bot requested a review from mjasikowski August 10, 2026 07:17
@suneox

suneox commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

Note

An issue where editing the odometer sometimes shows 'not found'—and reloading redirects to an invalid route—is out of scope for this migration. This is also currently happening on the latest staging v9.4.51-1

Page not found & wrong navigation
CleanShot.2026-08-10.at.17.59.04.1.mp4
CleanShot.2026-08-10.at.18.02.59.2.mp4

I'll troubleshoot and report the existing bug after finishing this PR soon

@mjasikowski

Copy link
Copy Markdown
Contributor

@suneox conflicts

@garrettmknight
garrettmknight removed their request for review August 10, 2026 15:47
@suneox

suneox commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

@suneox conflicts

The conflicts have been resolved

mjasikowski
mjasikowski previously approved these changes Aug 11, 2026
@huult

huult commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

@suneox please resolve the conflicts

@suneox

suneox commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

@suneox please resolve the conflicts

The conflicts have been resolved

@quinthar quinthar removed the #quality label Aug 13, 2026
@suneox

suneox commented Aug 15, 2026

Copy link
Copy Markdown
Contributor Author

This PR is ready for merge

@mjasikowski
mjasikowski merged commit 541c308 into Expensify:main Aug 15, 2026
35 of 36 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🚧 mjasikowski has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify OSBotify mentioned this pull request Aug 18, 2026
86 tasks done
@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/mjasikowski in version: 9.4.55-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@MelvinBot

Copy link
Copy Markdown
Contributor

Help site review — no changes required

I reviewed the changes in this PR and no updates to Expensify's help site files (App/docs/articles) are required.

Why: This is an internal navigation/routing refactor. It migrates the distance, manual distance, and rate money-request steps from legacy backTo-parameter routes to dynamic routes (createDynamicRoute / DYNAMIC_ROUTES), and renames the associated SCREENS/route constants and step components (e.g. IOURequestStepDistance → DynamicIOURequestStepDistance). The user-facing flow is unchanged — tapping the Distance or Rate field still opens the same waypoint/rate editor and returns to the same place on Back/Save. Only the internal deep-link URL shape changes (.../distance/... → /r/<reportID>/expense-distance?...), with OldRoutes.ts redirects added for backward compatibility.

Scope checked:

  • No feature, tab, setting, or button was added, removed, or renamed.
  • No help article references these routes (expense-distance, distance-manual, distanceRate), the backTo param, or createDynamicRoute.
  • The existing distance/mileage articles (e.g. Set-time-and-distance-rates.md, Add-an-expense.md) describe product behavior that this PR does not alter.

Since there are no user-facing changes, I did not create a draft help site PR.

@m-natarajan

Copy link
Copy Markdown

@suneox @mjasikowski @huult
Step 3.5 in Test section is failing, Not sure we have to create an issue for this as we always validate only the QA steps section. "Upgrade" screen not visible when opening "Rate" on workspace with rates disabled. Should we create an issue for this?

Bug7236024_1787026970973.Migr10.mp4

@suneox

suneox commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor Author

@suneox @mjasikowski @huult Step 3.5 in Test section is failing, Not sure we have to create an issue for this as we always validate only the QA steps section. "Upgrade" screen not visible when opening "Rate" on workspace with rates disabled. Should we create an issue for this?

Bug7236024_1787026970973.Migr10.mp4

@m-natarajan The Tests section is meant for developers to verify all affected code, including cases that require injecting Onyx scripts / mock data to trigger the flow. The primary test cases for QA belong in the QA Steps section.

In this case, we need to re-verify whether the business logic is still valid.

@suneox

suneox commented Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

Here is test case 3.5:

CleanShot.2026-08-18.at.20.06.18.1.mp4
Prod
CleanShot.2026-08-18.at.20.07.24.2.mp4

@m-natarajan

Copy link
Copy Markdown

@suneox Noted, Thanks

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/Beamanator in version: 9.4.55-4 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 failure ❌

Bundle Size Analysis (Sentry):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants